Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TT-1112] Fix the sourcemap handler script #1229

Open
wants to merge 73 commits into
base: master
Choose a base branch
from

Conversation

return res;
}

addNewScriptHandler("sourcemaps", async (scriptId, sourceURL, relativeSourceMapURL) => {
Copy link
Author

@Domiii Domiii May 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addNewScriptHandler change 2

@@ -422,7 +422,7 @@ function Target_getCurrentMessageContents() {
};
}

addNewScriptHandler((scriptId, sourceURL, relativeSourceMapURL) => {
addNewScriptHandler("commands", (scriptId, sourceURL, relativeSourceMapURL) => {
Copy link
Author

@Domiii Domiii May 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addNewScriptHandler change 1

@@ -18,8 +18,6 @@

namespace blink {

extern bool LocalDOMWindowPointerIsValid(LocalDOMWindow* window);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo Brian's workaround.

Comment on lines 141 to 145
const AssetFiles = [
"replay_command_handlers.js",
"replay_sourcemap_handler.js",
];

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this (coupled with the block 156-158 below) the only change to this file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be!

@@ -167,11 +167,12 @@ function spawnChecked(cmd, args, options) {

const rv = spawnSync(cmd, args, options);

if (rv.status != 0 || rv.error) {
if (rv.status || rv.error || rv.signal) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this related to this change or TT-1150?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latter. But also: Its just a bug in this function 🤷‍♀️

@Domiii
Copy link
Author

Domiii commented May 10, 2024

Tried it a few more times locally: It seems to work!

@Domiii
Copy link
Author

Domiii commented May 12, 2024

Update:

  1. We see recorder crashes in CI because we require RECORD_REPLAY_ASSETS_DIRECTORY to be set in order to read the sourcemap scripts when recording. This looke like a design flaw in RecordReplayReadAssetFileContents.
    I pinged @bhackett1024 in a PM since this specific design decision has been a point of contention in a previous PR.
  2. We also need to make sure that we support multiple concurrently open/not-detached frames as explained here.

@Domiii Domiii marked this pull request as ready for review May 31, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants